<% if @custom.valid? %>
  SocialStream.RelationCustom.update({
    relation: {
      id: <%= @custom.id %>,
      name: "<%= @custom.name %>"
    },
    section: '<%= params[:section] %>'
  });
<% else %>
  SocialStream.Flash.error('<%= @custom.errors.full_messages.to_sentence %>');
<% end %>
